package Test;

import java.util.LinkedList;
import java.util.List;

public class TestUtils {

	
	public static boolean sameHash(byte[] storedHashedFileValue,byte[] hashedFileValue) {
		if (hashedFileValue.length != hashedFileValue.length){
			return false;
		}
		for (int i = 0; i < hashedFileValue.length; i++) {
			if (storedHashedFileValue[i] != hashedFileValue[i]){
				return false;
			}
		}
		return true;
	}



public static List<String> setUpArgs(String input,String[] args) {
	List<String> commands = new LinkedList<String>();
	int index = 0;
	while(index!=-1){
		index = input.indexOf(' ');
		if (index==-1){
			commands.add(input);
			break;
		}
		commands.add(input.substring(0, index));
		input = input.substring(index+1);
	}
	return commands;	
}
}
